package org.vogelsk.blue.gui;

import org.vogelsk.blue.R;

import android.app.Activity;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
/**
 * 
 * Activity for the game, main point of the application
 * 
 * @author dejan.dosic
 *
 */
public class BlueSquireActivity extends Activity {
	
	
	private BlueSurfaceView view;

	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
		Bitmap ballImage = null;
		Bitmap greenPowerUpImage = null;
		Bitmap paddleImage = null;
		Bitmap brickImage1 = null;
		Bitmap brickImage2 = null;
		Bitmap brickImage3 = null;
		Bitmap brickImage4 = null;
    	AssetManager manager = getAssets();
		Bitmap paddleIcon = null;
		Bitmap threeball = null; 
		Bitmap plasmaBall = null;
		Bitmap skull = null;
		Bitmap money = null;
		Bitmap arrow = null;
		Bitmap paddleLarge = null;
		Bitmap plasma = null;

			ballImage = BitmapFactory.decodeResource(getResources(),R.drawable.red_orb);
			plasmaBall = BitmapFactory.decodeResource(getResources(),R.drawable.plasma_orb);
			paddleImage = BitmapFactory.decodeResource(getResources(),R.drawable.squire);
			paddleIcon = BitmapFactory.decodeResource(getResources(),R.drawable.squire_icon);
			paddleLarge = BitmapFactory.decodeResource(getResources(),R.drawable.squire_large);
			greenPowerUpImage = BitmapFactory.decodeResource(getResources(),R.drawable.green_orb);
			brickImage1 = BitmapFactory.decodeResource(getResources(),R.drawable.bric_dark);
			brickImage2 = BitmapFactory.decodeResource(getResources(),R.drawable.bric_darker);
			brickImage3 = BitmapFactory.decodeResource(getResources(),R.drawable.bric_light);
			brickImage4 = BitmapFactory.decodeResource(getResources(),R.drawable.bric_d41);
			threeball = BitmapFactory.decodeResource(getResources(),R.drawable.triforce);
			skull = BitmapFactory.decodeResource(getResources(),R.drawable.skull);
			money = BitmapFactory.decodeResource(getResources(),R.drawable.bag_of_money);
			arrow = BitmapFactory.decodeResource(getResources(),R.drawable.arrows);
			plasma = BitmapFactory.decodeResource(getResources(),R.drawable.plasma);


        super.onCreate(savedInstanceState);
        
        view = new BlueSurfaceView(this, ballImage, paddleImage, brickImage1, brickImage2, brickImage3, brickImage4, paddleLarge, paddleIcon,  greenPowerUpImage, threeball, plasmaBall, skull, money, arrow, plasma);
        setContentView(view);

    }
    
}